package com.cyber.plus.registry;

import com.cyber.plus.CyberMod;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.Block;
import net.minecraft.block.ExperienceDroppingBlock;
import net.minecraft.block.Material;
import net.minecraft.util.math.intprovider.UniformIntProvider;

import static com.cyber.plus.util.BlocksUtil.registryBlock;

/**
 * 方块
 *
 * @version 1.0
 * @author: 贺坤
 * @createTime: 2023年06月27日 20:59
 */
public class ModBlocks {

    /**
     * 柠檬酸块
     */
    public static final Block CITRINE_BLOCK;
    /**
     * 柠檬酸矿物
     */
    public static final Block CITRINE_ORE;
    public static final Block CITRINE_ORE_DEEPSLATE;

    static {
        // 定义一个默认配置的方块
        CITRINE_BLOCK = registryBlock("citrine-block", ModItemGroup.CITRINE);
        // 定义一般的矿
        CITRINE_ORE = registryBlock("citrine-ore", new ExperienceDroppingBlock(FabricBlockSettings.of(
                        //	石头或由石头制成的砌块的材料，通常喜欢用鹤嘴锄打碎。
                        Material.STONE
                )
                .strength(5.0F)
                .requiresTool(),
                // 定义经验范围 最小值和最大值
                UniformIntProvider.create(5, 20)
        ), ModItemGroup.CITRINE);
        // 定义深层矿
        CITRINE_ORE_DEEPSLATE = registryBlock("citrine-ore-deepslate",
                new ExperienceDroppingBlock(FabricBlockSettings.of(Material.STONE)
                        .strength(10.0F)
                        .requiresTool(),
                        // 定义经验范围 最小值和最大值
                        UniformIntProvider.create(10, 30)
                ),
                ModItemGroup.CITRINE);
        ;
    }

    public static void registerModBlocks() {
        CyberMod.LOGGER.debug("注册方块" + CyberMod.MOD_ID);
    }
}
